package org.osiris.server.bussinesscore;


import java.util.Vector;

import javax.persistence.Transient;

import org.apache.log4j.Logger;
import org.osiris.persistence.Requisito;
import org.osiris.persistence.controllers.RequisitoInterface;
import org.osiris.server.utils.AppContext;
import org.springframework.context.ApplicationContext;

public class Vigia {
	
	private RequisitoInterface requisitoDAO;
	private Vector<Requisito> Requisitos;

	Logger logger = Logger.getLogger(this.getClass());
	@Transient
	private ApplicationContext ctx = AppContext.getApplicationContext();
	
	public Vigia(){
		super();

		if(requisitoDAO==null){
			requisitoDAO=(RequisitoInterface) ctx.getBean("RequisitoJpaController");
		}
	}
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public void consultaRequisitos(){
	
		Requisitos=(Vector)requisitoDAO.findRequisitoEntities();
		
		for(Requisito req: Requisitos){
			req.comoEstas();
		}
	}

}
